package com.zh.note.demo.javaSE;

/**
 * @Author: zhanghuan
 * @date: 2023/4/2 21:22
 * @description: create it
 */
public class MathDemo {

    public static void main(String[] args) {
        double floor = Math.floor(-8.5);
        //2的5次方
        System.out.println(Math.pow(2, 5));//32.0
        // 绝对值
        System.out.println(Math.abs(-1));//1
        // 四舍五入
        System.out.println(Math.round(-4.5));//-4
        // 根号2
        System.out.println(Math.sqrt(2));
    }
}
